import { createVuePlugin } from 'vite-plugin-vue2'
import vitePluginImp from 'vite-plugin-imp'
import { fileURLToPath, URL } from 'node:url'
export default {
  plugins: [
    createVuePlugin(),
    vitePluginImp({
      libList: [
        {
          libName: 'vant',
          style(name) {

            if (/CompWithoutStyleFile/i.test(name)) {

              return false
            }
            return `vant/es/${name}/style/index.js`
          }
        }
      ]
    })],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url)),
      'assets': fileURLToPath(new URL('./src/assets', import.meta.url)),
    }
  }
}